
<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="zh_cn">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <title>4.5.&nbsp;&#25805;&#20316;&#29305;&#23450; HTML &#20803;&#32032;&#30340;&#25152;&#26377;&#23454;&#20363; [&#28145;&#20837;&#27973;&#20986; Greasemonkey]</title>
      <link rel="shortcut icon" href="/favicon.ico">
      <link rel="stylesheet" href="../css/dig.css" type="text/css">
      <meta http-equiv="Link" content='&lt;../css/modern.css&gt;; type="text/css"; rel=stylesheet, &lt;../css/empty.css&gt;; type="text/css";
      rel=stylesheet'>
      <link rev="made" href="mailto:mark@diveintomark.org">
      <meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
      <meta name="keywords" content="Firefox, Greasemonkey, Javascript, user script, userscript">
      <link rel="start" href="../toc/index.html" title="&#28145;&#20837;&#27973;&#20986; Greasemonkey">
      <link rel="up" href="index.html" title="&#31532;&nbsp;4&nbsp;&#31456;&nbsp;&#20844;&#20849;&#27169;&#24335;">
      <link rel="prev" href="iterate-every-element.html" title="4.4.&nbsp;&#25805;&#20316;&#25152;&#26377; HTML &#20803;&#32032;">
      <link rel="next" href="match-attribute.html" title="4.6.&nbsp;&#25805;&#20316;&#25152;&#26377;&#26377;&#29305;&#23450;&#23646;&#24615;&#30340;&#20803;&#32032;">
   </head>
   <body id="diveintogreasemonkey-org" class="pattern-oneelement">
      <div class="z" id="intro">
         <div class="sectionInner">
            <div class="sectionInner2">
               <div class="s">
                  <h1><a href="/" accesskey="1">&#28145;&#20837;&#27973;&#20986; Greasemonkey</a></h1>
                  <p>&#25945;&#32769;&#32593;&#32476;&#23398;&#26032;&#25226;&#25103;</p>
               </div>
               <div class="s">
                  <ul>
                     <li><a href="../">&#36215;&#22987;&#39029;</a> &middot; 
                     </li>
                     <li><a href="../toc/">&#30446;&#24405;</a> &middot; 
                     </li>
                     <li><a href="../download/">&#19979;&#36733;</a> &middot; 
                     </li>
                     <li><a href="http://greasemonkey.mozdev.org/">&#31435;&#21363;&#19979;&#36733; Greasemonkey</a></li>
                  </ul>
               </div>
            </div>
         </div>
      </div>
      <div id="main">
         <div id="mainInner">
            <p id="breadcrumb">&#24744;&#30340;&#20301;&#32622;&#65306;<a href="../">&#36215;&#22987;&#39029;</a> &#8594; <a href="../toc/index.html">&#30446;&#24405;</a> &#8594; <a href="index.html">&#20844;&#20849;&#27169;&#24335;</a> &#8594; <span class="thispage">&#25805;&#20316;&#29305;&#23450; HTML &#20803;&#32032;&#30340;&#25152;&#26377;&#23454;&#20363;</span></p>
            <div class="section" lang="zh_cn">
               <div class="titlepage">
                  <div>
                     <div>
                        <h2 class="title"><a name="pattern.oneelement" class="skip" href="#pattern.oneelement" title="link to this section"><img src="../images/permalink.gif" alt="[link]" title="link to this section" width="8" height="9"></a> 4.5.&nbsp;&#25805;&#20316;&#29305;&#23450; <acronym title="HyperText Markup Language">HTML</acronym> &#20803;&#32032;&#30340;&#25152;&#26377;&#23454;&#20363;
                        </h2>
                     </div>
                     <div>
                        <div class="abstract">
                           <h3 class="title"></h3>
                           <p>&#26377;&#26102;&#24744;&#38656;&#35201;&#25805;&#20316;&#39029;&#38754;&#20013;&#29305;&#23450; <acronym title="HyperText Markup Language">HTML</acronym> &#20803;&#32032;&#30340;&#25152;&#26377;&#23454;&#20363;&#12290;&#20363;&#22914;&#25913;&#21464;&#25152;&#26377; <code class="sgmltag-element">&lt;textarea&gt;</code> &#30340;&#23383;&#20307;&#22823;&#23567;&#12290;&#26368;&#31616;&#21333;&#30340;&#21150;&#27861;&#23601;&#26159;&#35843;&#29992; <code class="function">getElementsByTagName('tagname')</code>&#65292;&#23427;&#36820;&#22238;&#19968;&#20010;&#21487;&#36941;&#21382;&#25805;&#20316;&#30340;&#20803;&#32032;&#38598;&#21512;&#12290;
                           </p>
                        </div>
                     </div>
                  </div>
               </div>
               <div class="example"><a name="example.pattern.oneelement" class="skip" href="#example.pattern.oneelement" title="link to this example"><img src="../images/permalink.gif" alt="[link]" title="link to this example" width="8" height="9"></a> 
                  <h3 class="title">&#20363;&nbsp;4.5.&nbsp;&#33719;&#21462;&#39029;&#38754;&#19978;&#25152;&#26377;&#30340; textarea</h3><pre class="programlisting ">var allTextareas, thisTextarea;
allTextareas = document.getElementsByTagName('textarea');
for (var i = 0; i &lt; allTextareas.length; i++) {
	thisTextarea = allTextareas[i];
	// &#20351;&#29992; thisTextarea
}</pre></div>
               <div class="note">
                  <table class="admon" summary="">
                     <tr>
                        <td class="admonicon"><a href="../appendix/tips.html" title="&#25216;&#24039;&#28165;&#21333;"><img alt="[&#27880;&#24847;]" src="../images/note.png" width="24" height="24" title=""></a></td>
                        <td class="admontext">
                           <p>&#19981;&#24212;&#35813;&#29992;&#36825;&#20010;&#26041;&#27861;&#26469;&#25805;&#20316;&#39029;&#38754;&#20013;&#25152;&#26377;&#30340;&#38142;&#25509;&#65292;&#22240;&#20026; <code class="sgmltag-element">&lt;a&gt;</code> &#20803;&#32032;&#20063;&#21487;&#20197;&#29992;&#20316;&#39029;&#38754;&#20013;&#30340;&#38170;&#12290;&#35201;&#30693;&#36947;&#22914;&#20309;&#26597;&#25214;&#39029;&#38754;&#20013;&#25152;&#26377;&#30340;&#38142;&#25509;&#65292;&#35831;&#26597;&#30475;<a href="match-attribute.html" title="4.6.&nbsp;&#25805;&#20316;&#25152;&#26377;&#26377;&#29305;&#23450;&#23646;&#24615;&#30340;&#20803;&#32032;">&#25805;&#20316;&#25152;&#26377;&#26377;&#29305;&#23450;&#23646;&#24615;&#30340;&#20803;&#32032;</a>&#12290;
                           </p>
                        </td>
                     </tr>
                  </table>
               </div>
               <div class="usedby">
                  <h3>&#23454;&#20363;</h3>
                  <ul>
                     <li>
                        <a href="http://www.firefox.net.cn/dig/download/zoomtextarea.user.js">Zoom Textarea</a>
                        
                     </li>
                  </ul>
               </div>
            </div>
            <div style="float: left">&#8592;&nbsp;<a class="NavigationArrow" href="iterate-every-element.html">&#25805;&#20316;&#25152;&#26377; HTML &#20803;&#32032;</a></div>
            <div style="text-align: right"><a class="NavigationArrow" href="match-attribute.html">&#25805;&#20316;&#25152;&#26377;&#26377;&#29305;&#23450;&#23646;&#24615;&#30340;&#20803;&#32032;</a>&nbsp;&#8594;
            </div>
            <hr style="clear:both">
            <div class="footer">
               <p class="copyright">&#29256;&#26435; &copy; 2005 Mark Pilgrim &middot; <a title="&#21457;&#36865;&#32473;&#25105;&#26377;&#20110;&#27492;&#20070;&#30340;&#21453;&#39304;&#24847;&#35265;" href="mailto:mark@diveintomark.org">mark@diveintomark.org</a> &middot; <a href="../license/gpl.html" title="GNU &#36890;&#29992;&#20844;&#20849;&#35768;&#21487;&#35777;">&#20351;&#29992;&#26465;&#27454;</a></p>
            </div>
         </div>
      </div>
   </body>
</html>